﻿//-----------------------------------------------------------------------
// <copyright file="Person.cs" company="MKCoolsoft">
//     Copyright (c) mkcoolsoft. All rights reserved.
// </copyright>
// <author>Mario Kuhl</author>
// <revision>26.01.2014 Initial version</revision>
//-----------------------------------------------------------------------

namespace MKCoolsoft.GPXLib
{
    #region usings

    using System;
    using System.Collections.Generic;

    #endregion usings

    /// <summary>
    /// A person or organization.
    /// </summary>
    public class Person
    {
        #region private fields

        /// <summary>
        /// Name of person or organization.
        /// </summary>
        private string nameField;

        /// <summary>
        /// Email address.
        /// </summary>
        private Email emailField;

        /// <summary>
        /// Link to Web site or other external information about person.
        /// </summary>
        private Link linkField;

        #endregion private fields

        #region constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="Person"/> class.
        /// </summary>
        public Person()
        {
            this.emailField = new Email();
            this.linkField = new Link();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Person"/> class.
        /// This "private" constructor is for hiding the public constructor for 
        /// serialize / deserialize
        /// </summary>
        /// <param name="dummy">This is a dummy parameter.</param>
        private Person(int dummy)
        { 
        }

        #endregion constructors

        #region public properties

        /// <summary>
        /// Gets or sets the Name of a person.
        /// </summary>
        public string Name
        {
            get
            {
                return this.nameField;
            }

            set
            {
                this.nameField = value;
            }
        }

        /// <summary>
        /// Gets or sets the Email of a person.
        /// </summary>
        public Email Email
        {
            get
            {
                return this.emailField;
            }

            set
            {
                this.emailField = value;
            }
        }

        /// <summary>
        /// Gets or sets the Link of a person.
        /// </summary>
        public Link Link
        {
            get
            {
                return this.linkField;
            }

            set
            {
                this.linkField = value;
            }
        }

        #endregion public properties
    }
}
